<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content ">
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i>退换货</h3>
                </div>
                <div class="panel-body ">
                    <form method="post" id="return_form" action="{:U('Admin/Order/returnInfo')}">
                        <div class="tab-content col-md-10">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>
                                        <tr>
                                            <td class="col-sm-2 text-right">订单编号：</td>
                                            <td class="col-sm-8">
                                                <a href="{:U('Admin/Order/detail',array('order_id'=>$orderReturn['order_id']))}">{$orderReturn.order_sn}</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">用户：</td>
                                            <td>
                                                {$user.nickname}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">申请日期：</td>
                                            <td>
                                                {$orderReturn.addtime|date="Y-m-d H:i",###}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">商品名称：</td>
                                            <td>
                                                <a href="{:U('Home/Goods/goodsInfo',array('id'=>$orderReturn[goods_id]))}" target="_blank">{$goods[goods_name]}</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">退换货：</td>
                                            <td>
                                                <div class="form-group">
                                                    <select name="type" class="input-sm">
                                                        <if condition="$orderReturn['type'] eq 0">
                                                            <option value="0" <if condition="$orderReturn['type'] eq 0">selected="selected"</if>>退货</option>
                                                        <else/>
                                                            <option value="1" <if condition="$orderReturn['type'] eq 1">selected="selected"</if>>换货</option>
                                                        </if>
                                                    </select>
                                                </div>
                                                <a href="{:U('Admin/User/userLogEdit',array('id'=>$orderReturn[user_id],'user_money'=>$order[order_amount],'desc'=>'退货退款到余额'))}">
                                                    <input class="btn btn-primary" type="button" value="退款到用户余额">
                                                </a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">退货描述：</td>
                                            <td>
                                                <textarea name="reason" id="reason" cols="" rows="" readonly="readonly" class="area form-control" style="width:400px; height:120px;">{$orderReturn['reason']}</textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">用户上传照片：</td>
                                            <td>
                                                <volist name="orderReturn[imgs]" id="item">
                                                    <a href="{$item}" target="_blank"><img src="{$item}" width="85" height="85" /></a>&nbsp;&nbsp;&nbsp;
                                                </volist>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">状态：</td>
                                            <td>
                                                <div class="form-group">
                                                    <select class="input-sm" name="status">
                                                        <if condition="$orderReturn['status'] eq 2">
                                                            <option value="2" <if condition="$orderReturn['status'] eq 2">selected="selected"</if>>已完成</option>
                                                        <else/>
                                                            <option value="0" <if condition="$orderReturn['status'] eq 0">selected="selected"</if>>未处理</option>
                                                            <option value="1" <if condition="$orderReturn['status'] eq 1">selected="selected"</if>>处理中</option>
                                                            <option value="2" <if condition="$orderReturn['status'] eq 2">selected="selected"</if>>已完成</option>
                                                        </if>
                                                    </select>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class = "text-right">处理备注：</td>
                                            <td>
                                                <textarea name="remark" id="remark" cols="" rows="" class="area form-control" style="width:400px; height:120px;">{$orderReturn['remark']}</textarea>
                                            </td>
                                        </tr>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <td>
                                                <input type="hidden" name="id" value="{$id}">
                                            </td>
                                            <td class="text-right">
                                                <if condition="$orderReturn['status'] neq 2">
                                                    <input class="btn btn-primary" type="submit" value="保存">
                                                </if>
                                            </td>
                                        </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function adsubmit() {
    $('#handleposition').submit();
}
</script>
</body>

</html>
